-- GENERATED SPELL FOR [Nether Whelp] --


function spell0_20021(pUnit, Event) --@Arcane Blast,n/a--
pUnit:FullCastSpellOnTarget(38881,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20021', 10500, 1)
end

function spell1_20021(pUnit, Event) --@Arcane Bolt,n/a--
pUnit:FullCastSpellOnTarget(13901,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20021', 2500, 1)
end

function spell2_20021(pUnit, Event) --@Blink,Self--
pUnit:FullCastSpellOnTarget(36097,pUnit)
pUnit:RegisterEvent('Sorts_20021', 1338, 1)
end

function spell3_20021(pUnit, Event) --@Intangible Presence,n/a--
pUnit:FullCastSpellOnTarget(36513,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20021', 8318, 1)
end

function spell4_20021(pUnit, Event) --@Mana Burn,n/a--
pUnit:FullCastSpellOnTarget(38884,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20021', 3000, 1)
end

function Sorts_20021(pUnit, Event)
local choix_sorts_20021 = math.random(0, 4)
if choix_sorts_20021 == 0 then
pUnit:RegisterEvent('spell0_20021', 1, 1)
end
if choix_sorts_20021 == 1 then
pUnit:RegisterEvent('spell1_20021', 1, 1)
end
if choix_sorts_20021 == 2 then
pUnit:RegisterEvent('spell2_20021', 1, 1)
end
if choix_sorts_20021 == 3 then
pUnit:RegisterEvent('spell3_20021', 1, 1)
end
if choix_sorts_20021 == 4 then
pUnit:RegisterEvent('spell4_20021', 1, 1)
end
end

function mob20021_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20021', math.random(1500, 3000), 1)
end

function mob20021_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20021_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20021_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20021, 1, 'mob20021_Action')
RegisterUnitEvent(20021, 2, 'mob20021_Leave')
RegisterUnitEvent(20021, 3, 'mob20021_Kill')
RegisterUnitEvent(20021, 4, 'mob20021_Die')
